<?php

namespace App\Model;

use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\SoftDeletes;

class Good extends Model
{

    public $timestamps='true';

    public $guarded=[];

    public $casts = ['img'=>'array'];

    use SoftDeletes;

    public function belongsToType()
    {
        return $this->belongsTo(Type::class,'cate','id');
    }

    public function hasManyRecord()
    {
        return $this->hasMany(Record::class,'good_id','id');

    }
    //
}
